<!DOCTYPE html>
<html>
<head>
    <title>商保异动管理</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="form-group col-sm-2">
            <input type="text" class="form-control" v-model="q.bxgs" placeholder="保险公司">
        </div>
        <div class="form-group col-sm-2">
            <select v-model="q.sblx" class="form-control" readonly="readonly">
                <option v-for="sblx in sblx" :value="sblx.value">{{sblx.label}}</option>
            </select>
        </div>
        <div class="form-group col-sm-2">
            <input type="text" class="form-control" v-model="q.bxje" placeholder="保险金额">
        </div>
        <div class="grid-btn">
            <a class="btn btn-primary" @click="query"></i>&nbsp;查询</a>
            <!-- #if($shiro.hasPermission("sbydgl:save"))
             <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
             #end-->
            #if($shiro.hasPermission("sbydgl:update"))
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            #end
            #if($shiro.hasPermission("sbydgl:delete"))
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
            #end
            <a class="btn btn-primary" @click="queryDetlist"><i class="fa "></i>&nbsp;查看明细</a>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-1 control-label">商保类型</div>
                <div class="col-sm-2">
                    <select v-model="sbydgl.sblx" class="form-control" disabled="disabled">
                        <option v-for="sblx in sblx" :value="sblx.value">{{sblx.label}}</option>
                    </select>
                </div>
                <div class="col-sm-1 control-label">保险公司</div>
                <div class="col-sm-2">
                    <select v-model="sbydgl.bxgs" class="form-control" disabled="disabled">
                        <option v-for="bxgs in bxgs" :value="bxgs.value">{{bxgs.label}}</option>
                    </select>
                </div>
                <div class="col-sm-1 control-label">保险金额</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="sbydgl.bxje" placeholder="保险金额" readonly="readonly"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-1 control-label">保险编号</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="sbydgl.bxCode" placeholder="保险编号"/>
                </div>
                <div class="col-sm-1 control-label">生效日期</div>
                <div class="col-sm-2">
                    <el-date-picker v-model="sbydgl.startDate" type="date" placeholder="生效日期"/>
                </div>
                <div class="col-sm-1 control-label">失效日期</div>
                <div class="col-sm-2">
                    <el-date-picker v-model="sbydgl.endDate" type="date" placeholder="失效日期"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-1 control-label">备注</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="sbydgl.bz" placeholder="备注"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>

    <!--异动明细列表-->
    <div id="windowdetlist" hidden="true">
            <div class="grid-btn">
                <div class="form-group col-sm-2">
                    <input type="text" class="form-control" v-model="qdet.username" placeholder="用户名">
                </div>
              <!--  <div class="form-group col-sm-2">
                    <input type="text" class="form-control" v-model="qdet.startDate" placeholder="开始生效日期"
                           readonly="readonly"
                           onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" onchange="startDate(this.value)"/>
                </div>
                <div class="form-group col-sm-2">
                    <input type="text" class="form-control" v-model="qdet.endDate" placeholder="结束生效日期"
                           readonly="readonly"
                           onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" onchange="endDate(this.value)"/>
                </div>-->

                <a class="btn btn-default" @click="queryDet">查询</a>
                #if($shiro.hasPermission("sbydgl:update"))
                <a class="btn btn-primary" @click="updateDet"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
                #end
                #if($shiro.hasPermission("sbydgl:delete"))
                <a class="btn btn-primary" @click="delDet"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
                #end
                #if($shiro.hasPermission("sbydgl:firstaudit"))
                <a class="btn btn-primary" @click="firstaudit"><i class="fa fa-pencil-square-o"></i>&nbsp;一审</a>
                #end
                #if($shiro.hasPermission("sbydgl:secondaudit"))
                <a class="btn btn-primary" @click="secondaudit"><i class="fa fa-pencil-square-o"></i>&nbsp;二审</a>
                #end
                #if($shiro.hasPermission("sbydgl:thirdaudit"))
                <a class="btn btn-primary" @click="thirdaudit"><i class="fa fa-pencil-square-o"></i>&nbsp;三审</a>
                #end
                <a class="btn btn-primary" @click="replaceperson"><i class="fa fa-pencil-square-o"></i>&nbsp;人员替换</a>
                <a class="btn btn-primary" @click="addBusinesspay"><i class="fa fa-pencil-square-o"></i>&nbsp;商保付款发起</a>
            </div>
            <table id="jqGridDet"></table>
            <div id="jqGridPagerDet"></div>
    </div>
    <!--异动明细列表-->
    <!--选择已生效明细列表-->
    <div id="selectwindowdetlist" hidden="true">
        <div class="grid-btn">
          <!--  <div class="form-group col-sm-2">
                <input type="text" class="form-control" v-model="qdet.username" placeholder="用户名">
            </div>
            <a class="btn btn-default" @click="queryDet">查询</a>-->
            <a class="btn btn-primary" @click="replace"><i class="fa fa-pencil-square-o"></i>&nbsp;替换</a>
        </div>
        <table id="jqGridDetselect"></table>
        <div id="jqGridPagerDetselect"></div>
    </div>
    <!--选择已生效明细列表-->
    <!--异动明细-->
    <div id="windowdet" hidden="true">
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-1 control-label">姓名</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="sbydglDet.userName" placeholder="姓名"
                           readonly="readonly"/>
                </div>
                <div class="col-sm-1 control-label">身份证</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="sbydglDet.idNo" placeholder="身份证"
                           readonly="readonly"/>
                </div>
                <div class="col-sm-1 control-label">性别</div>
                <div class="col-sm-2">
                    <select v-model="sbydglDet.sex" class="form-control" readonly="readonly" disabled="disabled">
                        <option v-for="sex in sex" :value="sex.value">{{sex.label}}</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-1 control-label">年龄</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="sbydglDet.age" placeholder="年龄"
                           readonly="readonly"/>
                </div>
                <div class="col-sm-1 control-label">生效日期</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="sbydglDet.startDate" placeholder="生效日期"
                           readonly="readonly"
                           onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" onchange="startDateDet(this.value)"/>
                </div>
                <div class="col-sm-1 control-label">失效日期</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="sbydglDet.endDate" placeholder="失效日期"
                           readonly="readonly" />
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-1 control-label">实际交付金额</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="sbydglDet.sjjfje" placeholder="实际交付金额"/>
                </div>
                <div class="col-sm-1 control-label">用工单位名称</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="sbydglDet.settlementName" placeholder="用工单位名称"
                           readonly="readonly"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-1 control-label">回款说明</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="sbydglDet.bz" placeholder="回款说明"/>
                </div>
            </div>
        </form>
    </div>
    <!--异动明细-->
    <!----------------------------商保付款发起窗口------------------------------------->
    <div id="windowbatchcode" hidden="true">
        <div class="form-group">
            <div class="col-sm-2 control-label">选择批次号</div>
            <div class="col-sm-10">
                <select class="form-control" readonly="readonly" id="selectbatchcode">
                    <option value=""></option>
                    <option v-for="batchcodelist in batchcodelist" :value="batchcodelist.batchcode">{{batchcodelist.batchcode}}</option>
                </select>
            </div>
        </div>
        <div class="col-sm-12 popfooter">
            <a class="btn btn-primary btn-sm" @click="windowbatchcodesubmit">确定</a>
            <a class="btn btn-primary btn-sm" @click="windowbatchcodeclose">关闭</a>
        </div>
    </div>
    <!----------------------------商保付款发起窗口结束------------------------------------->
</div>

<script src="${rc.contextPath}/js/socialSecurity/sbydgl.js?_${date.systemTime}"></script>
</body>
</html>